package com.eduhzy.ttw.clazz.mvp.model;

import com.eduhzy.ttw.clazz.mvp.contract.GroupReviewContract;
import com.eduhzy.ttw.clazz.mvp.model.api.service.ClazzApi;
import com.eduhzy.ttw.clazz.mvp.model.entity.ClazzScoreData;
import com.eduhzy.ttw.clazz.mvp.model.entity.ReviewGroupData;
import com.eduhzy.ttw.clazz.mvp.model.entity.ReviewStudentData;
import com.eduhzy.ttw.commonsdk.entity.CommonData;
import com.jess.arms.di.scope.FragmentScope;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;

import java.util.List;
import java.util.Map;

import javax.inject.Inject;

import io.reactivex.Observable;

/**
 * @author xubo
 * @date 2018-12-5 15:35:22
 */
@FragmentScope
public class GroupReviewModel extends BaseModel implements GroupReviewContract.Model {


    @Inject
    public GroupReviewModel(IRepositoryManager repositoryManager) {
        super(repositoryManager);
    }

    @Override
    public Observable<CommonData<List<ReviewGroupData>>> getTeamList(Map<String, Object> map) {
        return mRepositoryManager.obtainRetrofitService(ClazzApi.class).getTeamList(map);
    }

    @Override
    public Observable<CommonData<List<ReviewStudentData>>> getTeamUser(Map<String, Object> map) {
        return mRepositoryManager.obtainRetrofitService(ClazzApi.class).getTeamUser(map);
    }

    @Override
    public Observable<CommonData<List<ClazzScoreData>>> getEvaluateTagList(Map<String, Object> map) {
        return mRepositoryManager.obtainRetrofitService(ClazzApi.class).getEvaluateTagList(map);
    }

    @Override
    public Observable<CommonData<Map>> scoreSave(Map<String, Object> map) {
        return mRepositoryManager.obtainRetrofitService(ClazzApi.class).scoreSave(map);
    }
}